home *** CD-ROM | disk | FTP | other *** search
/ Champak 54 / Vol 54.iso / games / turttleo.swf / scripts / frame_1 / DoAction.as < prev   
Encoding:
Text File  |  2007-10-01  |  3.4 KB  |  81 lines

  1. _root.theLocalSharedObject = SharedObject.getLocal("FTurtleCookie");
  2. if(_root.theLocalSharedObject.data.volume == undefined)
  3. {
  4.    _root.theLocalSharedObject.data.volume = 0.8;
  5. }
  6. _root.but_click = new Sound();
  7. _root.but_click.attachSound("menu_hit.wav");
  8. _root.but_tog = new Sound();
  9. _root.but_tog.attachSound("menu_toggle.wav");
  10. _root.musik = new Sound();
  11. _root.musik.attachSound("gameplay3.mp3");
  12. _root.hero_death = new Sound();
  13. _root.hero_death.attachSound("hero_death.wav");
  14. _root.set_sounds = function(volume_lvl)
  15. {
  16.    _root.theLocalSharedObject.data.volume = volume_lvl;
  17.    _root.theLocalSharedObject.flush();
  18.    _root.but_click.setVolume(70 * volume_lvl);
  19.    _root.but_tog.setVolume(5 * volume_lvl);
  20.    _root.musik.setVolume(90 * volume_lvl);
  21.    _root.hero_death.setVolume(80 * volume_lvl);
  22.    _root.hero_fall = new Sound();
  23.    _root.hero_fall.attachSound("hero_fall.wav");
  24.    _root.hero_fall.setVolume(100 * volume_lvl);
  25.    _root.hero_jump = new Sound();
  26.    _root.hero_jump.attachSound("hero_jump00.wav");
  27.    _root.hero_jump.setVolume(100 * volume_lvl);
  28.    _root.hero_mon = new Sound();
  29.    _root.hero_mon.attachSound("hero_monster.wav");
  30.    _root.hero_jump.setVolume(100 * volume_lvl);
  31.    _root.hero_step = new Sound();
  32.    _root.hero_step.attachSound("hero_land.wav");
  33.    _root.hero_step.setVolume(60 * volume_lvl);
  34.    _root.hero_dmg = new Sound();
  35.    _root.hero_dmg.attachSound("hero_damage0.wav");
  36.    _root.hero_dmg.setVolume(100 * volume_lvl);
  37.    _root.pick_gsmall = new Sound();
  38.    _root.pick_gsmall.attachSound("pickup_coin.wav");
  39.    _root.pick_gsmall.setVolume(60 * volume_lvl);
  40.    _root.pick_gbig = new Sound();
  41.    _root.pick_gbig.attachSound("pickup_coin_big.wav");
  42.    _root.pick_gbig.setVolume(70 * volume_lvl);
  43.    _root.pick_diam = new Sound();
  44.    _root.pick_diam.attachSound("pickup_gem.wav");
  45.    _root.pick_diam.setVolume(70 * volume_lvl);
  46.    _root.pick_hp = new Sound();
  47.    _root.pick_hp.attachSound("bottle_life.wav");
  48.    _root.pick_hp.setVolume(100 * volume_lvl);
  49.    _root.pick_mp = new Sound();
  50.    _root.pick_mp.attachSound("bottle_air.wav");
  51.    _root.pick_mp.setVolume(100 * volume_lvl);
  52.    _root.savepoint = new Sound();
  53.    _root.savepoint.attachSound("checkpoint.wav");
  54.    _root.savepoint.setVolume(100 * volume_lvl);
  55.    _root.menumus = new Sound();
  56.    _root.menumus.attachSound("menu.wav");
  57.    _root.menumus.setVolume(100 * volume_lvl);
  58.    _root.snd_snain_die = new Sound();
  59.    _root.snd_snain_die.attachSound("snail_die");
  60.    _root.snd_snain_die.setVolume(100 * volume_lvl);
  61.    _root.snd_fish3_die = new Sound();
  62.    _root.snd_fish3_die.attachSound("fish3_die");
  63.    _root.snd_fish3_die.setVolume(100 * volume_lvl);
  64.    _root.snd_fish1_die = new Sound();
  65.    _root.snd_fish1_die.attachSound("fish1_die");
  66.    _root.snd_fish1_die.setVolume(100 * volume_lvl);
  67.    _root.snd_octopus_die = new Sound();
  68.    _root.snd_octopus_die.attachSound("octopus_die");
  69.    _root.snd_octopus_die.setVolume(100 * volume_lvl);
  70.    _root.snd_level_complete = new Sound();
  71.    _root.snd_level_complete.attachSound("level_complete");
  72.    _root.snd_level_complete.setVolume(100 * volume_lvl);
  73.    _root.snd_fruit_fall = new Sound();
  74.    _root.snd_fruit_fall.attachSound("fruit_fall1");
  75.    _root.snd_fruit_fall.setVolume(100 * volume_lvl);
  76.    _root.snd_fruit_shake = new Sound();
  77.    _root.snd_fruit_shake.attachSound("fruit_shake");
  78.    _root.snd_fruit_shake.setVolume(100 * volume_lvl);
  79. };
  80. _root.set_sounds(_root.theLocalSharedObject.data.volume);
  81.